package 拦截过滤器模式.filterManager;

import 拦截过滤器模式.Filter;
import 拦截过滤器模式.filter.FilterChain;
import 拦截过滤器模式.target.Target;

//过滤管理器
public class FilterManager {
   FilterChain filterChain;

   public FilterManager(Target target){
      filterChain = new FilterChain();
      filterChain.setTarget(target);
   }
   public void setFilter(Filter filter){
      filterChain.addFilter(filter);
   }

   public void filterRequest(String request){
      filterChain.execute(request);
   }
}
